<template>
  <div id="layoutView">
    <el-row type="flex">
      <el-col :span="width">
        <div class="grid-content left-bainer">
          <side-navigation></side-navigation>
        </div>
      </el-col>
      <el-col :span="24 - width">
        <div class="grid-content right-region">
          <el-container>
            <el-header><header-right-nav /></el-header>
            <common-tab></common-tab>
            <el-main><router-view></router-view></el-main>
          </el-container>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script setup lang='ts'>
import { ref, reactive, computed } from "vue";
import { useAllDataStore } from "@/stores";
import SideNavigation from "@/components/SideNavigation.vue";
import HeaderRightNav from "@/components/HeaderRightNav.vue";
import CommonTab from "@/components/CommonTab.vue";
const allDataStore = useAllDataStore();
const width = computed(() => (allDataStore.state.isCollapsible ? 1 : 2));
</script>

<style scoped>
#layoutView {
  height: 100vh;
  width: 100%;
}
.el-col {
  border-radius: 4px;
}

.grid-content {
  border-radius: 4px;
  min-height: 36px;
  height: 100%;
  width: 100%;
}
.left-bainer {
  background: #545c64;
  height: 100vh;
}
.right-region {
  height: 100%;
  width: 100%;
}
</style>